package com.sxbang.friday.dao;

import com.sxbang.friday.model.SysRolePermission;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RolePermissionDao {
    @Insert("insert into sys_role_permission values(#{roleId},#{permissionId})")
    int insertUser(SysRolePermission sysRolePermission);
    @Delete("delete from sys_role_permission where id =#{id};")
    int deleteUser(int id);
    @Select("select * from sys_role_permission ")
    List<SysRolePermission> selectUser();
    @Select("select * from sys_role_permission where  id = #{id}")
    SysRolePermission getUser(int id);
    @Update("update sys_role_permission set permissionId = #{permissionId} where roleId = #{roleId}")
    int updateUser(SysRolePermission sysRolePermission);
}
